package common.com.androidbase.datarequest;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class YMS implements Parcelable {

    private int year;
    private List<Integer> ms;

    public YMS() {
    }

    public YMS(Parcel source) {
        year = source.readInt();
        ms = new ArrayList<Integer>();
        source.readList(ms, Integer.class.getClassLoader());
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public List<Integer> getMs() {
        return ms;
    }

    public void setMs(List<Integer> ms) {
        this.ms = ms;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(year);
        dest.writeList(ms);
    }

    public static final Creator<YMS> CREATOR = new Creator<YMS>() {

        @Override
        public YMS[] newArray(int size) {
            return new YMS[size];
        }

        @Override
        public YMS createFromParcel(Parcel source) {
            return new YMS(source);
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }
}
